package org.jeecg.sms.api;



import org.jeecg.sms.api.dto.MsgRequest;
import org.jeecg.sms.api.dto.MsgResponse;
import org.jeecg.sms.config.FeignConfig;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

@FeignClient(url = "${sms.url}",name = "smsService",configuration = FeignConfig.class)
public interface RemoteSmsService {


    /**
     * 发送短信
     * @param req
     * @param headers
     * @return
     */
    @PostMapping("/sms/v1/submit")
    MsgResponse sendMsg(@RequestBody MsgRequest req, @RequestHeader Map<String,String> headers);



}
